#!/bin/bash
set -e;
echo "begin config tools....."
mkdir -p /root/bin/;
touch /root/.bash_profile;

rm -f /root/bin/vmkill;
curl https://gitee.com/team_space/mynet_info/raw/master/pve_tools/vmkill --output /root/bin/vmkill;

rm -f /root/bin/repvestatd;
curl https://gitee.com/team_space/mynet_info/raw/master/pve_tools/repvestatd --output /root/bin/repvestatd;

rm -f /root/bin/vm_netcheck;
curl https://gitee.com/team_space/mynet_info/raw/master/pve_tools/vm_netcheck --output /root/bin/vm_netcheck;

chmod 755 /root/bin/*;
sed -i '/root\/bin/d' /root/.bash_profile;
echo 'export PATH=$PATH:/root/bin' >> /root/.bash_profile;

(crontab -l|grep -v repvestatd;echo -e '*/15 * * * * /root/bin/repvestatd') |crontab -
echo "finish config tools."





# curl https://gitee.com/team_space/mynet_info/raw/master/pve_init.sh|bash